#if !defined(__DOORBELL_CAMERA_H__)
#define __DOORBELL_CAMERA_H__

#include <esp_err.h>

#define CAM_PIN_PWDN    40
#define CAM_PIN_RESET   42
#define CAM_PIN_XCLK    37
#define CAM_PIN_SIOD    0
#define CAM_PIN_SIOC    1

#define CAM_PIN_D7      38
#define CAM_PIN_D6      36
#define CAM_PIN_D5      35
#define CAM_PIN_D4      33
#define CAM_PIN_D3      10
#define CAM_PIN_D2      12
#define CAM_PIN_D1      11
#define CAM_PIN_D0      9
#define CAM_PIN_VSYNC   41
#define CAM_PIN_HREF    39
#define CAM_PIN_PCLK    34

typedef struct {
    uint8_t *data;
    size_t size;
} doorbell_camera_frame_t;

void doorbell_camera_init();

esp_err_t doorbell_camera_get_frame(doorbell_camera_frame_t *frame);

void doorbell_camera_free(doorbell_camera_frame_t *frame);

void doorbell_camera_deinit();

#endif // __DOORBELL_CAMERA_H__
